package br.ufrgs.tcp.db;

import android.content.ContentValues;
import android.content.Context;
import br.ufrgs.tcp.model.IModel;
import br.ufrgs.tcp.model.Sala;

public class SalaSQLAdapter extends SQLAdapter {

	public SalaSQLAdapter(Context context) {
		super(context);
	}


	@Override
	protected String getTableName() {
		return AppSQLHelper.SALA_TABLE_NAME;
	}


	@Override
	protected <T extends IModel> ContentValues createContentValues(T data) {
		ContentValues contentValues = new ContentValues();
		
		Sala sala = (Sala) data;
		
		contentValues.put(AppSQLHelper.KEY_NUMERO, sala.getNumero());
		contentValues.put(AppSQLHelper.SALA_KEY_PREDIO, sala.getNumeroPredio());
		return contentValues;
	}


	@Override
	protected String[] getColumns() {
	
		return AppSQLHelper.SALA_COLUMNS;
	}

	
}
